package com.woniu.owner.controller;

import com.woniu.common.ResponseData;
import com.woniu.owner.service.DoorService;
import com.woniu.owner.service.SmartUnlockingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/door")
public class DoorController {
    @Autowired
    private DoorService doorService;
    @Autowired
    private SmartUnlockingService smartUnlockingService;

    /**
     * 查询小区所有的门禁信息
     *
     * @param communityId
     * @return
     */
    @GetMapping("/queryAllDoor")
    public ResponseData<?> queryAllDoor(@RequestParam String communityId) {
        return doorService.queryAllDoor(communityId);
    }

    @GetMapping("/queryAllSmartUnlocking")
    public ResponseData<?> queryAllSmartUnlocking(){
        return smartUnlockingService.queryAllSmartUnlocking();
    }
}
